<?php
         global $Room;
         $id=$data2['room'];


          if($Room[$id]['time4']==0){
            cleardjs($Room[$id]['djs'],$id);
            return false;
          }
         cleardjs($Room[$id]['djs'],$id);
         $Room[$id]['time4']=0;
         $Room[$id]['xx']['zt']=4;

         foreach ($Room[$id]['user'] as $connection3) {
            act('sss',$Room[$id]['bank']['index'],$connection3);
            act('clearmemberRobText','',$connection3);
            act('clearmemberRobText2','',$connection3);
            act('clearmemberTimesText','',$connection3);
         }

         //闲家下注
         $time_interval = 10;
         
         $Room[$id]['time5']=time()+$time_interval;
         djs($time_interval,'setxian',$id);


        if($Room[$id]['type']==4){
                $msg=array();

                $img='/app/img/X-'.$Room[$id]['beishu'].'.png';
                $msg['index']=$Room[$id]['bank']['index'];
                $msg['img']=$img;
        foreach ($Room[$id]['user'] as $connection3) {
          act('showmemberTimesText',$msg,$connection3);
        }
         }

        foreach ($Room[$id]['user'] as $connection3) {
            if($connection3->user['zt']==1){
              $Room[$id]['user'][$connection3->user['id']]->user['beishu']='-1';
            }
            if($connection3->user['online']!='-1'){
                act('djs',$Room[$id]['time5'],$connection3);
                $msg=array();
                $msg['id']='divRobBankerText';
                $msg['html']='<p class="liurenniuniu-ziti">闲家下注</p>';
                act('html',$msg,$connection3);
                if($connection3->user['zt']==1){
                if($connection3->user['index']!=$Room[$id]['bank']['index']){
                $msg=array();
                $msg['id']='operationButton';
                $msg['html']='<div class="divCoin divCoin1" style="display: block;
                    z-index: 200;" onclick="send(\'xianxz\',{bs:1})">
                      <img src="/app/img/bull9/bull_times_bg1.png"  class="operationButton-gg"  /> 
                      <div class="operationButton-gg3">
                       1倍
                      </div>
                     </div> 
                     <div class="divCoin divCoin2" style="display: block;
                    z-index: 200;" onclick="send(\'xianxz\',{bs:2})">
                      <img src="/app/img/bull9/bull_times_bg1.png"  class="operationButton-gg"  /> 
                      <div  class="operationButton-gg3"  >
                       2倍
                      </div>
                     </div> 
                     <div class="divCoin divCoin3" style="display: block;
                    z-index: 200;" onclick="send(\'xianxz\',{bs:4})">
                      <img src="/app/img/bull9/bull_times_bg1.png"  class="operationButton-gg"  /> 
                      <div  class="operationButton-gg3"  >
                       4倍
                      </div>
                     </div> 
                     <div class="divCoin divCoin4" style="display: block;
                    z-index: 200;" onclick="send(\'xianxz\',{bs:5})">
                      <img src="/app/img/bull9/bull_times_bg1.png"  class="operationButton-gg"  /> 
                      <div  class="operationButton-gg3"  >
                       5倍
                      </div>
                     </div> 
                ';
                act('html',$msg,$connection3);
                }
              else{
                $msg=array();
                $msg['id']='operationButton';
                $msg['html']='<div class="gongg" style="display: block;">等待闲家下注</div>';
                act('html',$msg,$connection3);
              }
              }
            }
        }